#ifndef _H_I_SERVICE_MSG_H_
#define _H_I_SERVICE_MSG_H_

#include "../typedefine.h"
#include "EServiceMsgType.h"
#include "../promise.h"

namespace QWER
{
	QDLL_EXPORT QCLASS IServiceMsg QABSTRACT
	{
	public:
#ifndef _USING_CLI
		virtual ~IServiceMsg() { }
#endif
		virtual EServiceMsgType GetMsgType() QCONST_FUNC = 0;

	protected:
		virtual CPromise<BOOLN>* _OnRecv() = 0;

#ifdef _USING_CLI
	internal:
#else
	private:
		friend class IRunner;
#endif
		inline CPromise<BOOLN>* _ExecOnRecv() { return _OnRecv(); }
	};
}

#endif
